package fhp.hlhj.giantfold.presenter

import com.lzy.okgo.model.HttpParams
import fhp.hlhj.giantfold.interfaces.IGainDetail
import fhp.hlhj.giantfold.javaBean.CashDetailBean
import fhp.hlhj.giantfold.javaBean.GainDetailBean
import fhp.hlhj.giantfold.module.AccontDetailModule

/**
 * author: FHP
 * data: on 2018\1\29 0029 10:36
 * E-Mail: 103945089@qq.com
 */
class AccountDetailPresenter(private val iGainDetail: IGainDetail) : AccontDetailModule.OnGetAccontDetailListener {
    private val module=AccontDetailModule()

    fun getAccountDetail(params: HttpParams){
        module.getaccontDetail(params,this)
    }

    fun getGainDetail(params: HttpParams){
        module.getGainDetail(params,this)
    }

    fun getSpendDetail(params: HttpParams){
        module.getSpendDetail(params,this)
    }

    fun getAvaDetail(params: HttpParams){
        module.getAva(params,this)
    }
    override fun showLoading() {
        iGainDetail.showLoading()
    }

    override fun onDetailListener(cashDetailBean: CashDetailBean) {
        iGainDetail.getDetailList(cashDetailBean)
    }

    override fun onGainListener(gainDetailBean: GainDetailBean) {
        iGainDetail.getGainDetailList(gainDetailBean)
    }
}